
#include "chordkeyinfo.h"


ChordKeyInfo::ChordKeyInfo( KeyTuple* keys, size_t index )
	: keys_( keys )
	, status_(KEY_READY)
#ifdef CHORD_POWER_OF_N
	, index_( index )
#endif
{
	keys->add_reference();
}

ChordKeyInfo::~ChordKeyInfo()
{
	RELEASE_OBJ( keys_ );
}

ChordKeyInfo* ChordKeyInfo::copy()
{
#ifdef CHORD_POWER_OF_N
	NEW_VAR_OBJECT( ChordKeyInfo, ck, ( keys_, index_ ) );
#else
	NEW_VAR_OBJECT( ChordKeyInfo, ck, ( keys_, 0 ) );
#endif
	return ck;
}

